home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / elecmail / ozt11b.zip / OZT.DOC next >
Text File  |  1993-04-01  |  18KB  |  433 lines

  1.  
  2. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  3. ────────────────────────────────────────────────────────────────────────────────
  4.  
  5. -- overview
  6.  
  7. OZT is a rethreader for OzCIS forum message files. When messages from multiple
  8. passes are stored in the same file, they will be in thread order only within
  9. each group. Each group starts with its own "dummy" message generated by OzCIS.
  10. This is called the forum pass header. OZT will take such a file, remove all
  11. forum pass headers, and duplicate messages, and reorganize the remainder into
  12. strict thread order based on message number.
  13.  
  14. OZT is designed to be simple to use, and to perform only the basic job without
  15. a lot of frills. There are two main reasons for this:
  16.  
  17.    a> my own needs for this are pretty simple
  18.    b> OzCIS v2 will have full-fledged interactive thread handling capabilities
  19.       - no sense writing something that would soon be made obsolete
  20.  
  21.  
  22. -- what's new in 1.1a(b)
  23.  
  24. I added the features mentioned in the "planned enhancements" category from 1.1:
  25.  
  26.    redirectable output
  27.    sets errorlevel on exit
  28.    write caching
  29.  
  30. Also new:
  31.  
  32.    debug lists command line option
  33.    blank line between sections in summary list
  34.    original file is renumbered rather than output file
  35. b  will now remove a Ctrl-Z end-of-file marker from the input file if found
  36. b  widened "level" column in thread table output
  37. b  fixed bug : stack overflow (RTE 202) with heavily nested threads
  38.  
  39.  
  40.    -- redirectable output
  41.  
  42. Now all screen output can be sent into a file for later viewing. This could be
  43. useful to capture the output of several OZT sessions in a batch file and view
  44. them at the end of the batch run:
  45.  
  46.    ozt bor\bpascal over kill tables > ozt.out
  47.    ozt ibmcom\ibmcom over kill tables >> ozt.out
  48.    list ozt.out
  49.  
  50. Or it could be used to keep a log of all OZT runs, or to simply send the output
  51. to the bit-bucket:
  52.  
  53.    ozt > nul
  54.  
  55.  
  56.    -- sets errorlevel on exit
  57.  
  58. This feature would also be used in batch files. If the program runs
  59. succesfully, or the help screen is displayed (by running with no parameters),
  60. the errorlevel is 0. If the program terminates prematurely for any other
  61. reason, the errorlevel is 1. Perhaps in the future I will assign different
  62. error levels to the different errors that can occur, but for now I'll just
  63. leave it at "yes" or "no".
  64.  
  65.  
  66. _66
  67.  
  68. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  69. ────────────────────────────────────────────────────────────────────────────────
  70.  
  71. -- what's new...
  72.    -- write caching
  73.  
  74. I included this feature in hopes of reducing the disk-thrashing that occurs
  75. when writing the final output file. The previous version would read then write
  76. every single message individually. This version will read as many messages as
  77. possible from the input file into a buffer, and then write the entire buffer.
  78. There is still a fair amount of thrashing that goes on, but nowhere nearly as
  79. much as before. There are even ways to improve this (keeping as much of the
  80. file in memory as possible), but for now, this works.
  81.  
  82.  
  83.    -- debug lists command line options
  84.  
  85. Since this program is still "wet behind the ears", I thought it prudent to
  86. allow users to have access to all of the intermediary structures that are
  87. generated during the process. Since there are more variations of message files
  88. under the Sun than dreamed of in my meager philosophy (Todd-atio), having this
  89. capability at hand will allow message reading problems to be pinpointed more
  90. quickly. See "-- using debug lists" below for more info.
  91.  
  92.  
  93.    -- blank line between sections in summary list
  94.  
  95. This is just a cosmetic thing, but it helps to break the list up a little bit.
  96.  
  97.  
  98.    -- original file is renumbered rather than output file
  99.  
  100. In version 1.1, when not using the "over" command line switch, the new output
  101. file would have a numbered extension. Versions 1.1a and above now apply the
  102. renumbering to the original file, and leave the output file with the original
  103. name. Confused yet? Imagine this session:
  104.  
  105.    ozt ibmcom\ibmcom
  106.  
  107.    OZT 1.1 produces                        OZT 1.1a & up produce
  108.  
  109.    ibmcom.mes - original file              ibmcom.001 - original file
  110.    ibmcom.001 - rethreaded version         ibmcom.mes - rethreaded version
  111.  
  112. The idea behind this, is if you wanted to rethread the file, then read it, you
  113. would have to rename *.001 to *.MES, using a temporary name in between. In
  114. fact, this is exactly what the later versions do internally.
  115.  
  116.  
  117. b  -- removes Ctrl-Z
  118.  
  119. When OZT starts, it looks at the very last byte of the input file. If this byte
  120. is a Ctrl-Z (#26, end-of-file marker), it is overwritten by a space. This makes
  121. it easier to merge files with the DOS COPY command. See "-- usage notes" below.
  122.  
  123.  
  124. b  -- widened "level" column in thread table output
  125.  
  126. This column can now display up to 32 levels of nesting. The previous version
  127. would be truncated after 11 levels. Lets see if any one can break this!
  128.  
  129.  
  130.  
  131.  
  132. _132
  133.  
  134. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  135. ────────────────────────────────────────────────────────────────────────────────
  136. -- what's new...
  137. b  -- stack overflow fixed
  138.  
  139. Previously, if a thread was encountered that 16 or more sequential replies, the
  140. program would crash with a Runtime Error #202. To solve this, I simply doubled
  141. the amount of stack space available to the program, from 16K up to 32K. We'll
  142. have to see what the next barrier is. Anyone have any threads with more than 32
  143. sequential replies?!
  144.  
  145.  
  146. -- installation
  147.  
  148. OZT can be placed in any subdirectory in the path. The most logical place to
  149. put it might be in your OzCIS subdirectory. OZT.EXE is self-contained and
  150. doesn't use or create any data files or temporary files, unless the "debug"
  151. option is used, in which case it creates LOST of output files. See below.
  152.  
  153.  
  154. -- operation
  155.  
  156. OZT is a command-line utility. It reads in a file, processes it, and spits it
  157. back out, with no user interaction. The command format is:
  158.  
  159.    OZT <message filename[.MES]> [over] [kill] [tables] [debug]
  160.  
  161. OZT will assume an extension of .MES if none is specified. There are three
  162. optional parameters which have the following effects:
  163.  
  164.    over    overwrites the original file (otherwise, OZT will rename the
  165.            original file by giving it a numbered extension)
  166.  
  167.    kill    deletes the .IXM file with the same name, causing OzCIS to reindex
  168.            the file the next time it is loaded
  169.  
  170.    tables  writes thread table and thread summary files to the disk - the table
  171.            contains the header for every message, with a rudimentary display of
  172.            hierarchy - the summary shows the first message of each thread, with
  173.            a count of messages in the thread
  174.  
  175.    debug   produce more onscreen information, and create debug output lists
  176.  
  177. An example usage would be:
  178.  
  179.    ozt ibmcom\ibmcom over kill tables
  180.  
  181. OZT would load IBMCOM.MES from the IBMCOM subdirectory below the current
  182. directory. The file would be rethreaded, and written back over its old self.
  183. The file IBMCOM\IBMCOM.IXM would be deleted if found, and the files
  184. IBMCOM\IBMCOM.TBL and IBMCOM\IBMCOM.SUM would be created.
  185.  
  186.  
  187. -- usage notes
  188.    -- using as an external from OzCIS
  189.  
  190. OZT can easily be installed on the Externals menu in OzCIS. Since different
  191. users will have different needs for this program, there is no one good way to
  192. set things up.
  193.  
  194. You may want to run OZT on a message file after you have read new messages.
  195. This would result in a file that only ever has two groups in it: previous
  196. messages, and new messages directly after a pass.
  197.  
  198. __198
  199.  
  200. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  201. ────────────────────────────────────────────────────────────────────────────────
  202.  
  203. -- usage notes...
  204.    -- using as an external...
  205.  
  206. You might instead only want to rethread a purge file (.PRG), or a particular
  207. save file (.SAV).
  208.  
  209. Probably the best way to run OZT as an external would be to house it in a batch
  210. file. That way, with one call you could run it on multiple forums, and in
  211. different ways for each forum. Here's an (untested) sample:
  212.  
  213.    @echo off
  214.    : rethread IBMCOM purged messages
  215.    ozt ibmcom\ibmcom.prg over
  216.    : rethread BPASCAL current messages
  217.    ozt bor\bpascal over kill
  218.  
  219.    : merge and rethread IBMPRO save files
  220.    copy /b ibmpro\ibmpro.mrg + ibmpro\ibmpro.sav ibmpro\ibmpro2.mrg
  221.    del ibmpro\ibmpro.mrg
  222.    ren ibmpro\ibmpro2.mrg ibmpro.mrg
  223.    ozt ibmpro\ibmpro.mrg over
  224.  
  225.  
  226. b  -- combining multiple files
  227.  
  228. OZT only works on one input file at a time. You can easily get OZT to "merge"
  229. several files by combining them with the DOS COPY command:
  230.  
  231.    copy ibmcom.mes + ibmcom.prg + ibmcom.sav ibmcom.mrg
  232.  
  233. The previous restriction of using the /B switch for the copy command has been
  234. removed. OZT will now remove an End-Of-File marker (Ctrl-Z) when it finds it as
  235. the last byte in the file. However, if there is already an EOF marker embedded
  236. within the file, OZT won't have any way of knowing about it. Such a file would
  237. be truncated at that point anyway by the COPY command, UNLESS the /B switch was
  238. used.
  239.  
  240. Suffice it to say that OZT will deal intelligently with an EOF marker if it is
  241. indeed at the end of the file.
  242.  
  243.  
  244. b  -- printing the thread table and summary
  245.  
  246. Both of these files are plain ASCII. The thread summary is 158 characters wide,
  247. and the thread table is 191 characters wide (as of 1.1b). The summary will just
  248. squeeze in on a wide carriage printer at 12 cpi, but you could easily print
  249. both of them with a compressed pitch. If you have a narrow printer, you could
  250. either cut out the columns you don't want to see, or ask me to create a narrow
  251. version.
  252.  
  253.  
  254.    -- using without OzCIS
  255.  
  256. It may be possible to rethread any CIS forum message capture file with OZT (ie
  257. non-OzCIS generated), but I have not tried this. Normally when downloading
  258. messages manually from CompuServe, they will come out in thread order anyway.
  259. OZT could probably be used to merge multiple message downloads though.
  260.  
  261.  
  262.  
  263.  
  264. _264
  265.  
  266. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  267. ────────────────────────────────────────────────────────────────────────────────
  268.  
  269. -- using debug lists
  270.  
  271. When (not if) you run across problems reading messages with OZT, there are a
  272. few ways to go about it. First of all, to aid me in tracking down the problem,
  273. please make a note of the exact errant behavior: error messages (runtime
  274. errors, OZT errors, DOS errors), whether or not it hung the machine, if you
  275. could escape with Ctrl-Break, etc. Also, it may be useful to provide an outline
  276. of your machine, and the contents of your AUTOEXEC.BAT and CONFIG.SYS files
  277. just in case.
  278.  
  279. Hopefully you won't have to experience this too often, but as I've mentioned
  280. before, I'm sure we will come across variations in messages that have not been
  281. anticipated.
  282.  
  283. Anyway, when something does go wrong, the best way to find out what happened is
  284. to rerun OZT with the same parameters on the same file, and include the command
  285. line switch "debug". This will cause the program to generate additional screen
  286. info, and write extra disk files that will help to track down the error.
  287.  
  288. The additional screen info consists mainly of the thread-building recursion
  289. process. A line is written for every message that is visited, indicating record
  290. number in the parent index, and level of recursion. (Normally this is indicated
  291. by a progressing row of periods. In all cases where the periods are seen, there
  292. is one period written for every ten messages processed). The other screen
  293. output difference generated by the "debug" switch is during writing the output
  294. file. A series of "r"s and "w"s will be written indicating input file reads,
  295. and output file writes. This process too is normally indicated with the row of
  296. periods.
  297.  
  298. If the error that you are trying to pinpoint did not cause the system to
  299. "hang", you can rerun the session "redirected" into a capture file. This will
  300. allow looking back over the entire session in a file viewer. You may try to do
  301. this if the error does cause a "hang", but its likely that the last portions of
  302. the redirected output will be lost, and you won't really know when the process
  303. stopped. (You could safely wait several minutes then reboot.)
  304.  
  305. NOTE : OZT will generate a LOT of files when the "debug" switch is used. You
  306. may want to pull everything off into its own subdirectory just to keep the
  307. clutter somewhat minimized. Also, none of the files are very big, but
  308. everything grows proportionately to the size of the message file being
  309. rethreaded, so you may want to be careful of disk space.
  310.  
  311. Here's a list of the files by order generated. All files start with the passed
  312. in name:
  313.  
  314.    ext   contents                                                    type
  315.    ----  ----------------------------------------------------------  ------
  316.    .TXT  all header info from every message, in original order       text
  317.    .UNS  the contents of parent index data structure, unsorted       text
  318.    .IND  parent index, sorted                                        text
  319.    .BL1  parent index, sorted, BLx for BLOCK dump)                   binary
  320.    .DUP  parent index, duplicates marked, resorted                   text
  321.    .BL2  same as previous                                            binary
  322.    .VIS  parent index, "visits" field filled in                      text
  323.    .TTB  thread table internal data structure                        text
  324.    .TSM  thread summary internal data structure                      text
  325.    .BL3  same as .VIS                                                binary
  326.    .THD  thread index, sorted                                        text
  327.  
  328.  
  329.  
  330. _330
  331.  
  332. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  333. ────────────────────────────────────────────────────────────────────────────────
  334.  
  335. -- using debug lists...
  336.  
  337. Generated by the "tables" command line switch:
  338.    .SUM  thread summary                                              text
  339.    .TBL  thread table                                                text
  340.  
  341.  
  342. In the event that you have problems reading a file and bring it to my
  343. attention, I will be able to tell you something like:
  344.  
  345.    "Run it again with the DEBUG command line switch and...
  346.  
  347.       ...tell me what the last file generated was."
  348.       ...look for BLAH BLAH BLAH in the XYZ file."
  349.       ...zip up the whole lot of 'em with the original input file, and email it
  350.       to me." (in the extreme case)
  351.  
  352.  
  353. -- planned enhancements
  354.  
  355.    removal of debug features when program is stable
  356.    reorganize documentation
  357.    update "There are xx replies" lines
  358. b  thread extraction feature
  359. b  thread deleted feature
  360.  
  361.  
  362. -- disclaimers
  363.    -- testing performed
  364.  
  365. I have only tested this program on messages from the few forums that I
  366. participate in. Needless to say, there are endless variations, within
  367. CompuServe specifically, and within the realm of human communications in
  368. general. You can be assured that the program performs its specified functions
  369. given "normal" circumstances. I have spent an increasing amount of time testing
  370. the program, and so far it runs "as planned" on the admittedly tame test files
  371. I have generated.
  372.  
  373. The two areas most likely to cause the program to fail:
  374.  
  375.    quirky positioning of "key" characters within message text (specifically the
  376.    "#: " message sequence starting at the beginning of a line - this happens
  377.    when someone embeds an "example" message within there own message)
  378.  
  379.    massive message files - I've tested the program with a 500K+ file, which it
  380.    took just fine - I presently have no idea what the maximum practical file
  381.    size is
  382.  
  383. I hope you'll forgive my somewhat less-than-rigorous approach to this, but be
  384. assured that as I come across problems, I will make them known, and correct
  385. them as possible.
  386.  
  387.  
  388.    -- liability
  389.  
  390. This software performs its functions, but you still use it at your own risk. I
  391. make no warranty as to the fitness of this program for a particular purpose. I
  392. will not be held liable for any damages arising from the use, misuse, or
  393. inability to use this software, even if I'm aware of the possibility of such.
  394.  
  395.  
  396. _396
  397.  
  398. OZT 1.1b - OzCIS Message Threader                  Copyright (C) 1993 Todd Fiske
  399. ────────────────────────────────────────────────────────────────────────────────
  400.  
  401. -- credits
  402.  
  403. OZT was inspired by Q Correll, with additional motivation from Pete Zisson, who
  404. both have lots of messages to deal with. This fact is made true due to the use
  405. of the #1 CompuServe navigator, OzCIS, for which we are all in the debt of
  406. Steve Sneed.
  407.  
  408. Written with Qedit by SewWare, compiled with Turbo Pascal 6.0 by Borland, with
  409. additional assistance from the Topaz 3.5 libraries by Software Science, and the
  410. TPALLOC unit by TurboPower Software.
  411.  
  412.  
  413. -- "ware" category, distribution
  414.  
  415. OZT is free. If you are driven to provide compensation, I will not refuse it!
  416.  
  417. Feel free to make copies of OZT to give it to friends and/or associates, but
  418. please distribute with all files intact and unchanged: OZT.EXE, OZT.DOC, and
  419. READ__ME.TXT.
  420.  
  421. However, please do not charge any money for it, including disk-copying costs.
  422. For the time being, OZT is "give-a-ware".
  423.  
  424.  
  425. -- contact
  426.  
  427. If you have any problems, comments, suggestions, criticism, flames, etc, I can
  428. be reached as follows:
  429.  
  430.    Todd Fiske
  431.    PO Box 9715-244                     CompuServe : 70451,1424
  432.    Portland ME 04104-2000              Delphi     : TFISKE
  433.